package com.example.myapplication4;

import android.app.Activity;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import androidx.annotation.Nullable;

public class TestOneActivity extends Activity implements View.OnClickListener {

    private Button btn_test;
    private LinearLayout layout;

//    TestRecvicer recvicer = new TestRecvicer();
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_one);
        btn_test = findViewById(R.id.btn_test);
        layout = findViewById(R.id.linear);
//        TestMethod method = new TestMethod("ada",this);
//        method.setName("asdasdsa");
        IntentFilter filter = new IntentFilter();
        filter.addAction("adasdas");
//        registerReceiver(recvicer,filter);
        btn_test.setOnClickListener(this);
//        btn_test.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                for (int i = 0;i<100;i++){
//                    TestButtonView view = new TestButtonView(TestOneActivity.this);
//                    view.setText("第"+i+"个");
//                    layout.addView(view);
//                }
//                btn_test.post(new Runnable() {
//                    @Override
//                    public void run() {
//                        try {
//                            Thread.sleep(10000000);
//                        } catch (InterruptedException e) {
//                            e.printStackTrace();
//                        }
//                    }
//                });
//            }
//        });
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
//        unregisterReceiver(recvicer);
    }

    @Override
    public void onClick(View v) {

    }
}
